﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class UI_Game_Rank : MonoBehaviour
{
    [SerializeField]
    private Image m_headTexture;
    [SerializeField]
    private Text m_name;
    [SerializeField]
    private Text m_score;

    [ContextMenu("GET_CHILD")]
    private void m_GetChild()
    {
        m_headTexture = transform.GetChild(0).GetChild(0).GetComponent<Image>();
        m_name = this.transform.GetChild(1).GetComponent<Text>();
        m_score = this.transform.GetChild(2).GetComponent<Text>();
    }

    public void HeadSet()
    {
        m_headTexture.color = Color.clear;
        m_name.text = "";
        m_score.text = "";
    }
    public void SetHead(Sprite pHeadSprite)
    {
        m_headTexture.color = Color.white;
        m_headTexture.sprite = pHeadSprite;
    }

    public void SetName(string pNickName)
    {
        m_name.text = pNickName;
    }

    public void SetScore(int pScore)
    {
        m_score.text = pScore.ToString();
    }
}
